<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
    <title>便携式储能电池价格配置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  #parse('/headFiles.html')
</head>
<body>
<div class="layui-fluid layui-form" wid100>
    <input type="hidden" name="id" value="$!{id}"/>
      <div class="layui-form-item">
        <label class="layui-form-label">模版标题</label>
        <div class="layui-input-block">
          <input type="text" name="title" lay-verify="required" placeholder="请输入收费模版标题" autocomplete="off" class="layui-input" value="$!{title}">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">所属代理</label>
        <div class="layui-input-block">
          <select id="userId" name="userId" class="layui-hide form-control" lay-ignore>
            <option value="$!{userId}">$!{userName}</option>
          </select>
        </div>
      </div>
    <div class="layui-form-item">
      <label class="layui-form-label">押金</label>
      <div class="layui-input-inline">
        <input type="text" name="depositMoneyStr" lay-verify="required"
               placeholder="请输入押金" autocomplete="off" class="layui-input" value="$!{depositMoneyStr}">
      </div>
      <div class="layui-form-mid layui-word-aux">元</div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">日最大费用</label>
      <div class="layui-input-inline">
        <input type="text" name="dayMaxMoneyStr" lay-verify="required"
               placeholder="请输入日最大费用" autocomplete="off" class="layui-input" value="$!{dayMaxMoneyStr}">
      </div>
      <div class="layui-form-mid layui-word-aux">元</div>
    </div>
   <div class="layui-form-item">
      <label class="layui-form-label">每小时支付</label>
      <div class="layui-input-inline">
        <input type="text" name="payIntervalMoneyStr" lay-verify="required"
             placeholder="请输入每小时支付金额" autocomplete="off" class="layui-input" value="$!{payIntervalMoneyStr}">
      </div>
      <div class="layui-form-mid layui-word-aux">元</div>
   </div>
  <div class="layui-form-item">
      <label class="layui-form-label">免费时长</label>
      <div class="layui-input-inline">
        <input type="text" name="freeTimes" lay-verify="required"
             placeholder="请输入免费时长" autocomplete="off" class="layui-input" value="$!{freeTimes}">
      </div>
      <div class="layui-form-mid layui-word-aux">分钟</div>
  </div>
  <div class="layui-form-item layui-hide">
    <input type="button" lay-submit lay-filter="LAY-form-submit" id="LAY-form-submit" value="确认">
  </div>
</div>
#parse('/footFiles.html')
<script>
layui.config({
  base: '$!{webRoot}/layuiadmin/'
  ,webRoot:'$!{webRoot}'
  ,resDomain:'$!{resDomain}'
}).extend({
  index: 'lib/index'
}).use(['index'],function (){
  $('#userId').select2({
    placeholder: "请选择代理",
    width:'300px',
    theme: 'bootstrap',
    ajax: {
      url: '$!{webRoot}/agent/select.data',
      method: 'post',
      delay: 250,
      processResults: function (result) {
        if (result.code == 200) {
          return {
            pagination: {more: result.body.more},
            results: result.body.data || []
          };
        } else {
          return {results: []};
        }
      }
    }
  });
})
</script>
</body>
</html>